package com.team.arms.service_management_before.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.team.arms.service_management_before.domain.StudentStatusRetain;
import com.team.arms.service_management_before.domain.vo.StudentStatusRetainVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Entity com.team.arms.service_management_before.domain.StudentStatusRetain
 */
public interface StudentStatusRetainMapper extends BaseMapper<StudentStatusRetain> {

    @Select("SELECT y.student_status_retain_id,b.name,y.admission_letter_id,y.educational_system,y.college_entrance_examination_score,\n" +
            "y.university_entrance_exam_address_and_postcode,y.admissions_department_phone,y.audit_status,y.exam_registration_numbers\n" +
            "FROM y_student_status_retain as y,b_bingyi_info as b\n" +
            "WHERE y.bingyi_id = b.bingyi_info_id\n" +
            "AND y.student_status_retain_id = #{studentStatusRetainId,jdbcType=VARCHAR}")
    StudentStatusRetainVo selectAllByStudentStatusRetainId(@Param("studentStatusRetainId") String studentStatusRetainId);

    @Select("SELECT y.student_status_retain_id,b.name,y.admission_letter_id,y.educational_system,y.college_entrance_examination_score,\n" +
            "y.university_entrance_exam_address_and_postcode,y.admissions_department_phone,y.audit_status,y.exam_registration_numbers\n" +
            "FROM y_student_status_retain as y,b_bingyi_info as b\n" +
            "WHERE y.bingyi_id = b.bingyi_info_id\n" +
            "AND ${field} like \"%${content}%\"")
    List<StudentStatusRetainVo> selectByFiled(@Param("field") String field,@Param("content") String content);

    @Select("SELECT y.student_status_retain_id,b.name,y.admission_letter_id,y.educational_system,y.college_entrance_examination_score,\n" +
            "y.university_entrance_exam_address_and_postcode,y.admissions_department_phone,y.audit_status,y.exam_registration_numbers\n" +
            "FROM y_student_status_retain as y,b_bingyi_info as b\n" +
            "WHERE y.bingyi_id = b.bingyi_info_id")
    List<StudentStatusRetainVo> selectList();
}




